package com.ruoyi.crm.sale.domain;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 合同管理对象 crm_contract
 * 
 * @author ruoyi
 * @date 2021-09-18
 */
public class CrmContract extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键id */
    private Long id;

    /** 合同名称 */
    @Excel(name = "合同名称")
    private String name;

    /** 客户ID */
    @Excel(name = "客户ID")
    private Long customerId;
    private String customerName;

    /** 商机ID */
    @Excel(name = "商机ID")
    private Long businessId;
    private String businessName;

    /** 审核状态 */
    @Excel(name = "审核状态")
    private Long checkStatus;

    /** 审核记录ID */
    private Long examineRecordId;

    /** 下单日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "下单日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date orderDate;

    /** 负责人ID */
    @Excel(name = "负责人ID")
    private Long ownerUserId;
    private String ownerUserName;

    /** 合同编号 */
    @Excel(name = "合同编号")
    private String num;

    /** 开始时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date startTime;

    /** 结束时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date endTime;

    /** 合同金额 */
    @Excel(name = "合同金额")
    private BigDecimal money;
    
    /** 合同金额大写 */
    private String moneydx;

    /** 整单折扣 */
    @Excel(name = "整单折扣")
    private BigDecimal discountRate;

    /** 产品总金额 */
    @Excel(name = "产品总金额")
    private BigDecimal totalPrice;

    /** 合同类型 */
    private String types;

    /** 付款方式 */
    private String paymentType;

    /** 批次 比如附件批次 */
    private String batchId;

    /** 只读权限 */
    private String roUserId;

    /** 读写权限 */
    private String rwUserId;

    /** 客户签约人 */
    @Excel(name = "客户签约人")
    private String contacts;

    /** 签约人电话 */
    @Excel(name = "签约人电话")
    private String contactsTel;

    /** 公司签约人 */
    @Excel(name = "公司签约人")
    private Long companyUserId;
    private String companyUserName;

    /** 最后跟进时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date lastTime;

    /** $column.columnComment */
    private BigDecimal receivedMoney;

    /** $column.columnComment */
    private BigDecimal unreceivedMoney;

    /** 删除标记 */
    private String delFlag;

    /** 附件 */
    @Excel(name = "附件")
    private String annex;

    /** 业务类型 */
    private Long type;
    
    /** 创建者名称 */
    private String createByName;
    
    /** 更新人名称 */
    private String updateByName;
    
    /** 交货地址  */
    private String placeDelivery;
    
    /** 合同模板  */
    private String template;

    
    public String getPlaceDelivery() {
		return placeDelivery;
	}

	public void setPlaceDelivery(String placeDelivery) {
		this.placeDelivery = placeDelivery;
	}

	public String getTemplate() {
		return template;
	}

	public void setTemplate(String template) {
		this.template = template;
	}

	public String getMoneydx() {
		return moneydx;
	}

	public void setMoneydx(String moneydx) {
		this.moneydx = moneydx;
	}

	private List<CrmBusinessProduct> productList;
    
    public List<CrmBusinessProduct> getProductList() {
		return productList;
	}

	public void setProductList(List<CrmBusinessProduct> productList) {
		this.productList = productList;
	}

	public String getCreateByName() {
		return createByName;
	}

	public void setCreateByName(String createByName) {
		this.createByName = createByName;
	}

	public String getUpdateByName() {
		return updateByName;
	}

	public void setUpdateByName(String updateByName) {
		this.updateByName = updateByName;
	}

	public String getCustomerName() {
		return customerName;
	}

	public void setCustomerName(String customerName) {
		this.customerName = customerName;
	}

	public String getBusinessName() {
		return businessName;
	}

	public void setBusinessName(String businessName) {
		this.businessName = businessName;
	}

	public String getOwnerUserName() {
		return ownerUserName;
	}

	public void setOwnerUserName(String ownerUserName) {
		this.ownerUserName = ownerUserName;
	}

	public String getCompanyUserName() {
		return companyUserName;
	}

	public void setCompanyUserName(String companyUserName) {
		this.companyUserName = companyUserName;
	}

	public Long getType() {
		return type;
	}

	public void setType(Long type) {
		this.type = type;
	}

	private List<CrmBusinessProduct> busProductList;

    public List<CrmBusinessProduct> getBusProductList() {
		return busProductList;
	}

	public void setBusProductList(List<CrmBusinessProduct> busProductList) {
		this.busProductList = busProductList;
	}

	public static long getSerialversionuid() {
		return serialVersionUID;
	}

	public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setName(String name) 
    {
        this.name = name;
    }

    public String getName() 
    {
        return name;
    }
    public void setCustomerId(Long customerId) 
    {
        this.customerId = customerId;
    }

    public Long getCustomerId() 
    {
        return customerId;
    }
    public void setBusinessId(Long businessId) 
    {
        this.businessId = businessId;
    }

    public Long getBusinessId() 
    {
        return businessId;
    }
    public void setCheckStatus(Long checkStatus) 
    {
        this.checkStatus = checkStatus;
    }

    public Long getCheckStatus() 
    {
        return checkStatus;
    }
    public void setExamineRecordId(Long examineRecordId) 
    {
        this.examineRecordId = examineRecordId;
    }

    public Long getExamineRecordId() 
    {
        return examineRecordId;
    }
    public void setOrderDate(Date orderDate) 
    {
        this.orderDate = orderDate;
    }

    public Date getOrderDate() 
    {
        return orderDate;
    }
    public void setOwnerUserId(Long ownerUserId) 
    {
        this.ownerUserId = ownerUserId;
    }

    public Long getOwnerUserId() 
    {
        return ownerUserId;
    }
    public void setNum(String num) 
    {
        this.num = num;
    }

    public String getNum() 
    {
        return num;
    }
    public void setStartTime(Date startTime) 
    {
        this.startTime = startTime;
    }

    public Date getStartTime() 
    {
        return startTime;
    }
    public void setEndTime(Date endTime) 
    {
        this.endTime = endTime;
    }

    public Date getEndTime() 
    {
        return endTime;
    }
    public void setMoney(BigDecimal money) 
    {
        this.money = money;
    }

    public BigDecimal getMoney() 
    {
        return money;
    }
    public void setDiscountRate(BigDecimal discountRate) 
    {
        this.discountRate = discountRate;
    }

    public BigDecimal getDiscountRate() 
    {
        return discountRate;
    }
    public void setTotalPrice(BigDecimal totalPrice) 
    {
        this.totalPrice = totalPrice;
    }

    public BigDecimal getTotalPrice() 
    {
        return totalPrice;
    }
    public void setTypes(String types) 
    {
        this.types = types;
    }

    public String getTypes() 
    {
        return types;
    }
    public void setPaymentType(String paymentType) 
    {
        this.paymentType = paymentType;
    }

    public String getPaymentType() 
    {
        return paymentType;
    }
    public void setBatchId(String batchId) 
    {
        this.batchId = batchId;
    }

    public String getBatchId() 
    {
        return batchId;
    }
    public void setRoUserId(String roUserId) 
    {
        this.roUserId = roUserId;
    }

    public String getRoUserId() 
    {
        return roUserId;
    }
    public void setRwUserId(String rwUserId) 
    {
        this.rwUserId = rwUserId;
    }

    public String getRwUserId() 
    {
        return rwUserId;
    }
    public void setContacts(String contacts) 
    {
        this.contacts = contacts;
    }

    public String getContacts() 
    {
        return contacts;
    }
    public void setContactsTel(String contactsTel) 
    {
        this.contactsTel = contactsTel;
    }

    public String getContactsTel() 
    {
        return contactsTel;
    }
    public void setCompanyUserId(Long companyUserId) 
    {
        this.companyUserId = companyUserId;
    }

    public Long getCompanyUserId() 
    {
        return companyUserId;
    }
    public void setLastTime(Date lastTime) 
    {
        this.lastTime = lastTime;
    }

    public Date getLastTime() 
    {
        return lastTime;
    }
    public void setReceivedMoney(BigDecimal receivedMoney) 
    {
        this.receivedMoney = receivedMoney;
    }

    public BigDecimal getReceivedMoney() 
    {
        return receivedMoney;
    }
    public void setUnreceivedMoney(BigDecimal unreceivedMoney) 
    {
        this.unreceivedMoney = unreceivedMoney;
    }

    public BigDecimal getUnreceivedMoney() 
    {
        return unreceivedMoney;
    }
    public void setDelFlag(String delFlag) 
    {
        this.delFlag = delFlag;
    }

    public String getDelFlag() 
    {
        return delFlag;
    }
    public void setAnnex(String annex) 
    {
        this.annex = annex;
    }

    public String getAnnex() 
    {
        return annex;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("name", getName())
            .append("customerId", getCustomerId())
            .append("businessId", getBusinessId())
            .append("checkStatus", getCheckStatus())
            .append("examineRecordId", getExamineRecordId())
            .append("orderDate", getOrderDate())
            .append("ownerUserId", getOwnerUserId())
            .append("num", getNum())
            .append("startTime", getStartTime())
            .append("endTime", getEndTime())
            .append("money", getMoney())
            .append("discountRate", getDiscountRate())
            .append("totalPrice", getTotalPrice())
            .append("types", getTypes())
            .append("paymentType", getPaymentType())
            .append("batchId", getBatchId())
            .append("roUserId", getRoUserId())
            .append("rwUserId", getRwUserId())
            .append("contacts", getContacts())
            .append("contactsTel", getContactsTel())
            .append("companyUserId", getCompanyUserId())
            .append("lastTime", getLastTime())
            .append("receivedMoney", getReceivedMoney())
            .append("unreceivedMoney", getUnreceivedMoney())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .append("delFlag", getDelFlag())
            .append("annex", getAnnex())
            .toString();
    }
}
